/*
 * @Author: tianchunyu
 * @Date: 2020-07-17 21:12:12
 * @LastEditTime: 2020-07-02 11:10:59
 * @LastEditors: Please set LastEditors
 * @Description: Dead reckoning algorithm source code
 * @FilePath: \X\1km\washer\control_pumps.c
 */ 
#ifndef _DEAD_RECKONING_H
#define _DEAD_RECKONING_H
#include <math.h>
#include <stdio.h>
/*
    below the parameter must be adaped to specific robot 
*/
#define MATH_WHEEL_MOTOR_REDUCE_RATIO (21)//减速比 电机和轮子之间的减速比
#define MATH_WHEEL_DIAMETER           (0.184)//unit meter
#define MATH_PI                       (3.1415926)
#define MATH_PULSE_PR                 (10000)   //一圈脉冲数字  

#define GREAT_SMALL_POINT_NUMBER      (0.00001)
extern double xp_pulse_differnce_to_distance(int pulse_value_differ);
double xp_angle_to_radian_by_ggpm01lk(double angle);
extern int  xp_calculate_location_coordinate(int left_pulse_differ,int right_pulse_differ,double angle,double *location_x,double *location_y);
double xp_get_last_location_x();
double xp_get_last_location_y();
void xp_clear_record_location();

#endif
